/*
 * @Author: doing
 * @Date: 2023-09-17 11:25:30
 * @LastEditors: git config user.name && git config user.email
 * @LastEditTime: 2023-09-17 11:42:38
 * @FilePath: \水果新鲜识别项目\service\app\service\home.js
 * @Description: 
 * home主页的service层
 * Copyright (c) 2023 by 1540265624@qq.com, All Rights Reserved. 
 */
"use strict";

const Service = require("egg").Service;
class HomeService extends Service {
  // 获取oss文件上传token

  async getUerTotal() {
      try {
        const { Op } = this.app.Sequelize;
        // 获取用户总数
        const userCount = await this.ctx.model.SysUser.count();
        return this.ctx.helper.ormSuccess(userCount);
      } catch (err) {
        return this.ctx.helper.ormError(err);
      }
  }
  
}

module.exports = HomeService;
